<html>
<head>
<style>
div		{ border: 2px red solid; background-color: pink; padding: 8px; }
button		{ width: 30%; }
</style>
<script>
var obj = { 'ct': 0 }
function incCount() { obj.ct++; return false; };
function setWatch() { obj.watch('ct', function( property, oldval, newval ) { return newval; } ); return false; }
function showCount() { document.getElementById('d1').innerHTML = obj.ct; }
</script>
</head>
<body>
<div id='d1'>?</div>
<button onclick='return incCount()'>Inc Count</button>
<button onclick='return setWatch()'>Set Watch</button>
<button onclick='return showCount()'>Show Count</button>
</body>
</html>
